package mylittleinvestigations.EasingFunctions;

public class EarthquakeEase extends EasingFunction
{
    public EarthquakeEase(int startValue, int endValue, int msDuration)
    {
        super(startValue, endValue, msDuration);
    }

    protected double GetNormalizedValue(double normalizedTime)
    {
        double dampeningFactor = 1 - normalizedTime;
        return dampeningFactor * (0.5 + Math.sin(Math.PI + normalizedTime * 14 * Math.PI) / 2);
    }
}
